<?php
/*
	Sponsor Manager (mainchecks.php file)
    Copyright (C) <Fri Feb 08 21:38:30 CET 2008>  Marcos Ramírez <marcosramirez@gmail.com>

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.

 */

//Remember! paths are relative to index.php path!.




//$_SESSION['mainchecksmade']=0;
// We check for required functions, only 1 time per session.
if ($_SESSION['mainchecksmade']!=1) {
	if (!function_exists(json_encode) || !function_exists(json_decode))
		die(_('JSON is not avalaible'));

	if (!function_exists(simplexml_load_file) || !function_exists(simplexml_load_string))
		die(_('XML Library not available'));

	// Warning level (non vital elements)
	if (!function_exists(_))
		$_SESSION['Warnings'][]=_('No gettext available, multilang disabled');
		
	//Check for users, if no one exists, we force to create one.
	if ($user->countUsers()==0)
		$_SESSION['nouser']=1;

	$_SESSION['mainchecksmade']=1;
}


?>